#ifndef LINENUMBER_H
#define LINENUMBER_H

#include "textedit.h"

class LineNumber : public QWidget
{
    public:
        LineNumber(TextEdit *editor) : QWidget(editor)
        {
            codeEditor = editor;
        }

        QSize sizeHint() const
        {
            return QSize(codeEditor->lineNumberAreaWidth(), 0);
        }

    protected:
        void paintEvent(QPaintEvent *event)
        {
            codeEditor->lineNumberAreaPaintEvent(event);
        }

    private:
        TextEdit *codeEditor;
};

#endif // LINENUMBER_H
